// 功能: 在当前目录下创建文件(creat file1)
void creat(void)
{
    int i;
    if(argc != 2)
    {
    printf("command creat must have one args. \n");
    return ;
    }
for(i = 0; i < INODENUM; i++)
{
if((inode_array[i].inum > 0) &&
(inode_array[i].type == '-') &&
!strcmp(inode_array[i].file_name, argv[1]))
{
printf("This file is exsit.\n");
return ;
}
}
for(i = 0; i < INODENUM; i++)
if(inode_array[i].inum < 0) break;
if(i == INODENUM)
{
printf("Inode is full.\n");
exit(-1);
}
inode_array[i].inum = i;
strcpy(inode_array[i].file_name, argv[1]);
inode_array[i].type = '-';
strcpy(inode_array[i].user_name, user.user_name);
inode_array[i].iparent = inum_cur;
inode_array[i].length = 0;
save_inode(i);
}